package com.zhou.bpm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhou.bpm.entity.BpmNode;
import com.zhou.bpm.mapper.BpmNodeMapper;
import com.zhou.bpm.service.IBpmNodeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zhoujinchuan
 * @Description: TODO（请添加描述）
 * @CreateTime: 2023/10/25 10:32
 */
@Service
public class BpmNodeServiceImpl extends ServiceImpl<BpmNodeMapper, BpmNode> implements IBpmNodeService {


    @Override
    public BpmNode getNode(String processCode, int i) {
        return lambdaQuery().eq(BpmNode::getProcessCode, processCode).eq(BpmNode::getOrderNum, i).one();
    }


    @Override
    public List<BpmNode> getBehindNode(String processCode, String currentNodeCode) {
        return baseMapper.getBehindNode(processCode, currentNodeCode);
    }
}
